import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
	mode: "history",
	routes: [{
		path: '/activity',
		name: 'activity',
		component: () => import('@/views/activity'),
		meta: {
			nav: 2,
			nokeep: true
		}
	}, {
		path: '/examination',
		name: 'examination',
		component: () => import('@/views/examination'),
		meta: {
			nav: '',
			nokeep: true
		}
	},  {
		path: '/',
		name: 'traffic',
		component: () => import('@/views/my/traffic'),
		meta: {
			nav: '',
			nokeep: true
		}
	},]
})
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
	return originalPush.call(this, location).catch(err => err)
}